#include <iostream>
using namespace std;

int main()
{
    freopen("arena.in","r",stdin);
    freopen("arena.out","w",stdout);
    int n, n2;
    cin >> n >> n2;
    for(int i = 0;i < n;i++)
    {
        int a;
        cin >> a;
    }
    for(int i = 0;i < n2;i++)
    {
        int a;
        cin >> a;
    }
    cin >> n2 >> n2 >> n2;
    for(int i = 0;i < n2;i++)
        cout << n << endl;
    fclose(stdin);
    fclose(stdout);
    return 0;
}
